@namespace SwashbucklerDiary.Rcl.Components
@inherits DialogComponentBase

<CustomMDialog MyValue="Visible"
               MyValueChanged="InternalVisibleChanged"
               Fullscreen="true"
               Transition=""
               OnBeforeShowContent="BeforeShowContent">
    <MToolbar Class="preview-image-dialog__toolbar"
              Elevation="0">
        <MButton Icon="true"
                 OnClick="() => InternalVisibleChanged(false)">
            <MIcon>
                arrow_back
            </MIcon>
        </MButton>

        <MSpacer></MSpacer>

        <MButton Icon="true"
                 OnClick="SaveToLocal">
            <MIcon>
                mdi:mdi-tray-arrow-down
            </MIcon>
        </MButton>
        <MButton Icon="true"
                 OnClick="Share">
            <MIcon>
                share
            </MIcon>
        </MButton>
    </MToolbar>

    <div class="preview-image-dialog__image__wraper">
        <div @ref="elementReference" class="preview-image-dialog__image">
            <img src="@mediaResourcePath?.DisPlayedUrl" />
        </div>
    </div>
</CustomMDialog>
